var v_list;
$(function(){
	v_list = new Vue({
		el: '#message-index',
		data: {
			type: 'init',
			list:[]
		},
		methods: {
			getList: function() {
				this.$http.get('../../message/list.do', {
				}).then(function(res) {
					//接收后端传来的数据
					console.log(toJson(res.data));
					if(res.data.success){
						this.list = res.data.data;
					}
				}, function(res) {
					console.log("getList()出错:"+toJson(res));
				});
			}
		},
		filters: {
			titlefilter: function(val) {
				if(val != null && val.length > 43)
					val = val.substring(0, 42) + '...';
				return val;
			}
		},
		ready: function() {
			//初始化获得总页面数和列表数据
			//$("#message-index").load('../s.html');
			$("#left").load('../left.html');
			this.getList();
		}
	});
});		